package ma.ac.onousc.gestionfi.budget.model;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.FetchType;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.ManyToOne;
import javax.persistence.OneToOne;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

@Entity
@Table
public class Virement implements Serializable {


	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;

	@Id
	@GeneratedValue(strategy = GenerationType.AUTO)
	private int idVirement;

	private Double mtVirement;

	@Temporal(TemporalType.TIMESTAMP)
	@Column
	private Date date;
	
	//bi-directional one-to-one association to OrdreModif
	@ManyToOne(fetch=FetchType.EAGER)
	private OrdreModif ordreModif;

	// bi-directional one-to-one association to RubriqueBudgetaire
	@OneToOne
	private RubriqueBudgetaire rubBudg;


	
	
	public Virement() {
		super();
	}

	public Virement(Double mtVirement) {
		super();
		this.mtVirement = mtVirement;
	}

	public Double getMtVirement() {
		return mtVirement;
	}

	public void setMtVirement(Double mtVirement) {
		this.mtVirement = mtVirement;
	}

	public int getIdVirement() {
		return idVirement;
	}

	public void setIdVirement(int idVirement) {
		this.idVirement = idVirement;
	}

	public Date getDate() {
		return date;
	}

	public void setDate(Date date) {
		this.date = date;
	}

	public OrdreModif getOrdreModif() {
		return ordreModif;
	}

	public void setOrdreModif(OrdreModif ordreModif) {
		this.ordreModif = ordreModif;
	}

	public RubriqueBudgetaire getRubBudg() {
		return rubBudg;
	}

	public void setRubBudg(RubriqueBudgetaire rubBudg) {
		this.rubBudg = rubBudg;
	}

	
	

}
